/* 
 * File:   Calendar.h
 * Author: Muqtafi Akhmad
 */
#include "../Utilities/boolean.h"
#include "../ADTFile/File.h"
#include "../ADTPriorityList/PriorityList.h"
#include "../ADTEvent/Event.h"
#include "../ADTDateTime/DateTime.h"
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>

#define ENTRY_NO "EntryNo"
#define EVENT_DESC "Event"
#define WHERE "Where"
#define WHEN "When"
#define LIST_OF_NAME "Participants"

#ifndef CALENDAR_H
#define CALENDAR_H

typedef struct {
    EventList events;
} Calendar;
/**
 * Returns an empty Calendar
 * @return calendar
 */
Calendar MakeCalendar();
/**
 * Returns list of events in the calendar
 * @param calendar the calendar
 * @return list of events
 */
EventList GetEvents(Calendar calendar);
/**
 * Set list of events
 * @param calendar the calendar
 * @param events the new list of event
 */
void SetEvents(Calendar *calendar, EventList events);
/**
 * Load a calendar file and read the events
 * @param calendar the calendar read
 * @param args file name
 */
void LoadCalendar(Calendar *calendar, char** args);
/**
 * View an event given the entry number
 * @param calendar the calendar
 * @param args entry number
 */
void View(Calendar *calendar, char** args);
/**
 * Add a new event to the calendar
 * @param calendar the calendar
 * @param args the new event entry number
 */
void Add(Calendar *calendar, char** args);
/**
 * Delete an event from list of events in calendar
 * @param calendar the calendar
 * @param args the entry number of deleted event
 */
void Delete(Calendar *calendar, char** args);
/**
 * Save event in list to a file
 * @param calendar the calendar
 * @param args file name to save events
 */
void SaveCalendar(Calendar *calendar, char** args);
/**
 * Set calendar to empty calendar, dealloc previous evente
 * @param calendar the calendar
 * @param args empty arguments
 */
void CreateCalendar(Calendar *calendar, char** args);
/**
 * Prints n first events
 * @param calendar the calendar
 * @param args empty arguments
 */
void PrintFirst(Calendar *calendar, char** args);
/**
 * Prints n last events
 * @param calendar the calendar
 * @param args empty arguments
 */
void PrintLast(Calendar *calendar, char** args);
/**
 * Show events in a given date
 * @param calendar the calendar
 * @param args date
 */
void ShowDetail(Calendar* calendar, char**args);
/**
 * Main Program Runner
 * @param calendar Current Calendar
 * @param args Arguments
 */
void RunInstructions(Calendar *calendar,char** args);
#endif

